import mockRequest from '@/utils/mockRequest'
const state = {
    list: {}
}

const mutations = {
    GETHOMEDATA(state, list){
        state.list = list
    }
}

const actions = {
    async getHomeData({commit}){
        let result = await mockRequest.get("/home/list")
        console.log(result)
        if(result.code == 20000){
            commit("GETHOMEDATA",result.data);
        }
    }
}

const getters = {}

export default {
    state,
    mutations,
    actions,
    getters
}